version: "3.9"

services:
  nginx:
    image: nginx:1.23.3
    ports:
      - "8080:80"
    volumes:
      - ${PWD}/nginx/nginx.conf:/etc/nginx/nginx.conf
      - ${PWD}/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
  application1:
    image: application1:v0.0.1
    build:
      context: application1
    ports:
      - "5001:5000"
    environment:
      APP2: "http://application2:5000"

  application2:
    image: application2:v0.0.1
    build:
      context: application2
    ports:
      - "5002:5000"
